﻿using System;
using System.Collections.Generic;

namespace Mono.Cecil
{
	// Token: 0x02000028 RID: 40
	internal abstract class SortedTable<TRow> : MetadataTable<TRow>, IComparer<TRow> where TRow : struct
	{
		// Token: 0x0600024B RID: 587 RVA: 0x00003088 File Offset: 0x00001288
		public sealed override void Sort()
		{
			MergeSort<TRow>.Sort(this.rows, 0, this.length, this);
		}

		// Token: 0x0600024C RID: 588 RVA: 0x0001454C File Offset: 0x0001274C
		protected static int Compare(uint x, uint y)
		{
			return (x == y) ? 0 : ((x > y) ? 1 : -1);
		}

		// Token: 0x0600024D RID: 589
		public abstract int Compare(TRow x, TRow y);
	}
}
